projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f4e9be
)
python/xc: do not crash xend if /proc/xen/privcmd cannot be opened
author
Ian Jackson
<Ian.Jackson@eu.citrix.com>
Tue, 22 Jun 2010 15:00:08 +0000
(16:00 +0100)
committer
Ian Jackson
<Ian.Jackson@eu.citrix.com>
Tue, 22 Jun 2010 15:00:08 +0000
(16:00 +0100)
If /proc/xen/privcmd cannot be opened,
start xend occurs Segmentation fault.
Add check to fix it.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
tools/python/xen/lowlevel/xc/xc.c
patch
|
blob
|
history
diff --git
a/tools/python/xen/lowlevel/xc/xc.c
b/tools/python/xen/lowlevel/xc/xc.c
index a7286c4e85270ffcfab77150e82d8b74f02cd411..13704249b527f9207a1cb3af9c917611b9b83020 100644
(file)
--- a/
tools/python/xen/lowlevel/xc/xc.c
+++ b/
tools/python/xen/lowlevel/xc/xc.c
@@
-72,7
+72,8
@@
static PyObject *pyxc_error_to_exception(xc_interface *xch)
else
pyerr = Py_BuildValue("(is)", err->code, desc);
- xc_clear_last_error(xch);
+ if (xch)
+ xc_clear_last_error(xch);
if ( pyerr != NULL )
{